package com.study.system.mapper;

import com.study.system.vo.NewsInfoVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface NewsMapper {

    // 根据社团ID查询所有发布的新闻
    List<NewsInfoVO> selectAllClubNews(Integer clubId);

    Integer deleteNewsById(Integer newsId);

    Integer modifyNews(Integer id, String title, String content, String time, Integer clubId);

    Integer insertNews(Integer userId, Integer clubId, String title, String content, String time);

    List<NewsInfoVO> selectNewsByTitle(String word, Integer clubId);

}
